<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    
    <title>Document</title>
    <style>
        *{
            box-sizing: border-box;
        }
        #t-box{
            width: 200px;
            height: 200px;
        }
        .box{
            
        }
        /* 100 + 10=110 */
        #t-box .b-box{
            width: 200px;
            height: 200px;
            background-color: red;
        }
        /* 10+10=20 */
        .box .b-box{
            background-color: blue;
        }
        .menu{
            width: 200px;
            height: 60px;
            border: 1px solid red;
        }
        .menu .item{
            width: 33%;
            height: 60px;
            float: left;
            line-height: 60px;
            text-align: center;
            border-right: 1px solid red;
        }
        .menu .item:last-child{
            border-right: 0;
        }
        .main{
            width: 200px;
            height: 200px;
            border: 1px solid blue;
        }
        .main .item{
            width: 100%;
            height: 100%;

        }
    </style>
</head>
<body>
    <div id="t-box" class="box">
         <div class="b-box"></div>
    </div>

    <div class="menu">
        <div class="item">一号</div>
        <div class="item">二号</div>
        <div class="item">三号</div>
    </div>
    <div class="main">
        <div class="item">111</div>
        <div class="item" style="display:none">222</div>
        <div class="item" style="display:none">333</div>
    </div>
    <script src="https://cdn.bootcss.com/jquery/3.4.0/jquery.min.js"></script>
    <script>
        $('.menu .item').click(function(){
            var idx = $(this).index();
            $('.main .item').eq(idx).show();
            $('.main .item').eq(idx).siblings().hide();
        })
        var obj = {a:1};
        var str = JSON.stringify(obj);
        console.log(JSON.parse(str));
        
         
        var obj = {
            name:"张三",
            age:10,
            children:{
                name:"",
            }
        }
        var xObj = obj;
        xObj.name = "李四";
        console.log(xObj.name);
        console.log(obj.name); //李四
        console.log()
        var copyObj = JSON.parse(JSON.stringify(obj));

        var arr5 = [1,2,3,4,5];
        arr5.reduce(function(total,v){
           return total + v;
        },0)
    </script>
</body>
</html>